package util

import (
	"os"

	"github.com/sirupsen/logrus"

	_const "aicloud/monitor-apiserver/pkg/util/const"
)

var (
	logger = logrus.New()
	level  = GetEnvIntOrDefault(_const.LOGGER_LEVEL_ENV, "4")
)

func init() {
	logger.SetOutput(os.Stdout)
	//logger.SetFormatter(customFormatter)
	logrus.SetLevel(logrus.Level(level)) // 默认info级别日志
}

func GetLogger() *logrus.Logger {
	return logger
}
